// =====================
// |   v.1|    
// =====================

require_once('./admincp/om-limit.php');
if ($_REQUEST['do'] == "add_ehdaa") {

$msg = "<thead><tr><td colspan=\"2\" class=\"thead\" colspan=\"2\"> </td></tr></thead>
<tbody>
<tr>
<td class=\"tcat\" align=\"center\" colspan=\"2\">    ..      </td>
</tr><tr>
<form method=\"POST\" action=\"global.php?do=do_add_ehdaa\">
<td class=\"alt2\" align=\"center\"> :</td>
<td class=\"alt2\" align=\"center\">$bbuserinfo[username]</td>
</tr><tr>
<td class=\"alt1\" align=\"center\">  :</td>
<td class=\"alt1\" align=\"center\"><input size=\"20\" type=\"text\" name=\"one\" size=\"50\"></td>
</tr><tr>
<td class=\"alt2\" align=\"center\"> :</td>
<td class=\"alt2\" align=\"center\"><input size=\"20\" type=\"text\" name=\"two\" size=\"50\"></td>
</tr><tr>
<td class=\"alt1\" align=\"center\"> :</td>
<td class=\"alt1\" align=\"center\"><input size=\"20\" type=\"text\" name=\"three\" size=\"50\"></td>
</tr>

<tr>
<td colspan=\"2\" class=\"tfoot\" align=\"left\"><input type=\"submit\" value=\"\"></form></td>
</tr>
</tbody>";


if ($bbuserinfo['usergroupid'] == 1) {
$msg = "<td class=\"alt3\" align=\"center\">             </td>";
}

if (!$bbuserinfo['userid']) {
$msg = "<td class=\"alt2\" align=\"center\"> ..    ..     </td>";
}

//   ..     (   )

if ($bbuserinfo['usergroupid'] == 8) {
$msg = "<td class=\"alt2\" align=\"center\">     ...       </td>";
}


eval('print_output("' . fetch_template('ehdaa_msg') . '");');

} elseif ($_REQUEST['do'] == "do_add_ehdaa") {

if (!$_POST['two']) {
$msg = "<td class=\"alt2\" align=\"center\"> ...    </td>";
} elseif (!$_POST['two']) {
$msg = "<td class=\"alt2\" align=\"center\"> ...    </td>";
} elseif (!$_POST['three']) {
$msg = "<td class=\"alt2\" align=\"center\"> ...   </td>";
} elseif (strlen($_POST['three']) > 200) {
$msg = "<td class=\"alt2\" align=\"center\"> ...       200 </td>";
} else {
$_POST['three'] = str_replace("<", "&lt;", $_POST['three']);
$_POST['three'] = str_replace(">", "&gt;", $_POST['three']);
$DB_site->query("INSERT INTO ehdaa(id,name,one,two,three) VALUES ('','$bbuserinfo[username]','$_POST[one]','$_POST[two]','$_POST[three]')");
$msg = "<td class=\"alt2\" align=\"center\">   </td>";
}

eval('print_output("' . fetch_template('ehdaa_msg') . '");');

} else {
$ehdaa_1 = $DB_site->query("SELECT * FROM ehdaa ORDER BY id DESC LIMIT $limit");
while ($ehdaa_row = mysql_fetch_array($ehdaa_1)) {
$ehdaa_bit .= " <a href=\"mailto:$ehdaa_row[one]\">$ehdaa_row[name]  </a> <font color=red> <font color=red> &nbsp;$ehdaa_row[two] </a> <font color=blue> == <font color=blue> $ehdaa_row[three]<font color=blue> == </a></font>";
}
$the_om_ehdaa = "<marquee style=\"border: 1px solid #000000\" onmouseover=this.stop() onmouseout=this.start() scrollAmount=3 scrollDelay=0 direction=right width=100%>$ehdaa_bit</marquee>";

}
